﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;

namespace GUI
{
    public partial class BaoCaoTongKetHocKy : Form
    {
        public BaoCaoTongKetHocKy()
        {
            InitializeComponent();
        }

        private void btThem_Click(object sender, EventArgs e)
        {

 
            string hocKy = cbHocKy.Text;
            if (string.IsNullOrEmpty(hocKy))
                MessageBox.Show("chưa thêm thông tin học kỳ");

            DataTable tb = TongKetHocKyBUS.TongKetHocKy( hocKy );

            grvTongKetHocKy.DataSource = tb;
            grvTongKetHocKy.Refresh();

 
           
        }

        private void btLuu_Click(object sender, EventArgs e)
        {
            DataTable tb = grvTongKetHocKy.DataSource as DataTable;

            if (tb != null)
            {
                TongKetHocKyBUS.LoadDuLieuXuong(tb);

                MessageBox.Show(this, "Lưu thành công ^^", "Thông báo");
            }
        }






    }
}
